Reggie! Game Patches
This page will explain how to create Reggie! Game Patches. Game patches are powerful plug-ins which alter the files Reggie! loads in order to reconfigure the editor for a particular NSMBW hack. In addition to standalone game patches, you can also use a "base" patch and work from there.
Index
Use the following links to navigate this page:
How Hard will it Be?
Getting Started: Creating a Folder
Setting Up a Basic main.xml
Creating Replacement Files
Adding Entries to main.xml
Game Patch Bases
Importing Individual Files
Edit Reference
File/Folder Reference
How Hard will it Be?
The level of difficulty varies depending on how complicated your NSMBW hack is. Generally, game patches are easier to create for simple hacks, and harder to create for complex hacks. You do not need to know how to program unless you've used ASM to add custom sprites to your hack, in which case you already know how to program. For more on that, see the page about creating custom sprite images.
The difficulty is relative - "simple" game patches are hard to make if you've never made one before. If you've never made one before, start with the most basic aspects, and gradually learn more advanced skills.
Game patches can take a very long time to make. "Simple" ones can take a few days, while complicated ones can take weeks or more. If you have only added a few basic things to your NSMBW hack such as levels, music, backgrounds and sprite textures, plan to spend several days creating a Reggie! game patch.
In addition, you need to know what XML files are and how to make them. If you're not familiar with that, Google it and then continue.
Getting Started: Creating a Folder
Every game patch resides in its own folder within reggiedata/games/ . The first thing to do, then, is to make a new folder there. The name doesn't make a difference, but pick something unique and descriptive.
Setting Up a Basic main.xml
The first file to create is called main.xml. It contains basic information about the game patch and links to files and folders. Create a blank file called main.xml and put it in your game patch folder.
Open it with a text editor or XML editor, and add the following data:
<game name="" version="" description="">
</game>
The name of the hack your game patch represents goes between the quotes in name="", the latest version of the hack goes in version="", and you can write a short description in description="".
Creating Replacement Files
To replace files that Reggie! uses, you first need to have those replacements. At the bottom of this page is a File/Folder Reference, a list of files and folders you can modify with game patches. To determine which of those to replace, use the Edit Reference, which is also near the bottom of this page.
Once you've decided which files to modify, decide which of them need to be overwritten and which of them need to be patched. The File/Folder Reference displays which files can be overwritten and which can be patched.
Now that you know which files to overwrite and which ones to patch, tackle them one by one. Each file you want to add to your game patch needs to be placed in the same folder as main.xml . Each folder must go there, too.
Modify each file accordingly. Most files Reggie! uses can be edited with a text editor such as Notepad, but image files need to be opened with an image editor. Every file has a different format, so learn how each one works accordingly.
Here's a tip: If you want to patch reggiedata/spritedata.xml , don't copy-and-paste the default file into your game patch folder. This file in particular is very very large, and it takes a long time to selectively delete everything you don't need. Instead, create a blank file and add the following:
<sprites>
</sprites>
From there, copy-and-paste individual entries for sprites you want to modify.
Adding Entries to Main.xml
After you make a file or folder, you need to add a tag to main.xml so Reggie! recognizes it. There are two kinds of tags you can use:
<folder name="" game="" path="" />
File tags specify individual files, and folder tags specify entire folders.
- Name is not the filename. It's a unique descriptor ID. The File Table at the end of this document lists replaceable files and their IDs.
- Game is a rarely used option. You use the game attribute when you have copied files from another hack. If you've copied a file from, for example, Newer Super Mario Bros. Wii, you can set the game attribute to "Newer Super Mario Bros. Wii", and it will load the file from Newer Super Mario Bros. Wii's game patch folder rather than yours. If left unspecified, the default setting is to use files from your game patch's folder.
Caution: If no game patch with the specified name exists, the entire tag will be ignored. - Path specifies the path to the new replacement file. The value is relative to your game patch's folder; so a path of "reggiedata/games/ExampleGame/spritedata.xml" should be entered as simply "spritedata.xml" .
- Patch is a case-insensitive boolean ("true" or "false") value. It specifies whether the replacement file should be used to make changes to the original or if it should completely replace the original. If set to "true", the replacement file will only make changes to the original. If left unspecified, the default value is "true".
Game Patch Bases
Not all NSMBW hacks are standalone. Some hacks, such as Newer Super Luigi Wii, are based off of another hack, such as Newer Super Mario Bros. Wii. If this applies to your hack, you can configure your game patch to automatically account for this.
The wrong way to do this for, say, Newer Super Luigi Wii would be to copy the entire NewerSMBW game patch and make changes. If the NewerSMBW game patch were to be updated, the Newer Super Luigi Wii patch would not reflect those updates. Instead, by using a "game patch base," the Newer Super Luigi Wii game patch will be both smaller and easier to update.
So, how does this work? The Newer Super Luigi Wii game patch would only include files which have been modified after NewerSMBW's. The Newer Super Luigi Wii game patch would then need to add the following attribute to its <game> tag:
The value of the base attribute needs to be the same as the name attribute of the game patch you want to reference. Reggie! checks each game patch in reggiedata/games/ until it finds one that matches. If no patch is found, the base attribute is ignored.
Importing Individual Files
If you have only copied a few aspects of a game into your hack, such as a some backgrounds from Another Super Mario Bros. Wii and a song from Newer Super Mario Bros. Wii, you can instruct Reggie! to import certain files from other game patches. This is different from using a game patch base because you only pick-and-choose specific files, whereas a base imports every file from another patch.
To import an individual file from a game patch, create a <file> or <folder> tag as if you had copied the file or folder directly into your game patch's folder. Then, add the following attribute:
where "Some Other Game Name" would be something like "Another Super Mario Bros. Wii" or "Newer Super Mario Bros. Wii". As with game patch bases, Reggie! will search every game patch until it finds one with a matching name. If no matching game patch is found, the entire tag is ignored.
Edit Reference
The following list can help you determine which files you should replace.
I have...
- ... changed the names, order and/or number of levels.
Replace reggiedata/levelnames.xml. - ... added and/or edited tilesets.
Edit or replace reggiedata/tilesets.xml. If you've added or edited any Pa0 tilesets, you may also want to edit reggiedata/ts1_descriptions.txt. - ... added and/or replaced background music.
Edit or replace reggiedata/music.txt. - ... added and/or edited backgrounds.
Replace reggiedata/bga.txt and/or reggiedata/bga.txt, and add corresponding screenshots to reggiedata/bga/ and/or reggiedata/bgb/. You can patch the entire reggiedata/bga/ and/or reggiedata/bgb/ folder(s) at once by using a folder tag instead of many file tags. - ... edited the textures or models of one or more sprites.
Replace the corresponding sprite image in reggiedata/sprites/. - ... added and/or edited one or more sprites using assembly code.
Edit reggiedata/spritedata.xml, and replace the corresponding sprite image using the procedure described on the Sprite Images page. You may also want to add your sprite to one or more categories by editing reggiedata/spritecategories.xml.
File/Folder Reference
The following table lists all files and folders you can modify using game patches, and some information about each one.
| Filename | File ID | Supports Overwrite | Supports Patches |
|---|---|---|---|
| Any file within reggiedata/bga | bga/filename | ✓ | |
| Any file within reggiedata/bgb | bgb/filename | ✓ | |
| reggiedata/bga.txt | bga | ✓ | ✓ |
| reggiedata/bgb.txt | bgb | ✓ | ✓ |
| reggiedata/entrancetypes.txt | entrancetypes | ✓ | ✓ |
| reggiedata/levelnames.xml | levelnames | ✓ | |
| reggiedata/music.txt | music | ✓ | ✓ |
| reggiedata/spritecategories.xml | spritecategories | ✓ | ✓ |
| reggiedata/spritedata.xml | spritedata | ✓ | |
| reggiedata/spritelistdata.txt | spritelistdata | ✓ | |
| sprites.py | sprites | ✓ | |
| reggiedata/tilesetinfo.xml | tilesetinfo | ✓ | |
| reggiedata/tilesets.xml | tilesets | ✓ | |
| reggiedata/ts1_descriptions.txt | ts1_descriptions | ✓ | ✓ |
| Folder Name | Folder ID | Supports Overwrite | Supports Patches |
| reggiedata/bga/ | bga | ✓ | |
| reggiedata/bgb/ | bga | ✓ |
